using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Ras2ClassLib;

namespace Ras2
{
	public partial class MainWindow : Form
	{
		private LagDoc songDocument = new LagDoc();
		private FlytjandiDoc performerDocument = new FlytjandiDoc();

		public MainWindow()
		{
			InitializeComponent();
			m_viewSongs1.Document = songDocument;
			m_performerView.Document = performerDocument;
		}

		private void OnFileExit(object sender, EventArgs e)
		{
			this.Close();
		}

		private void OnAddSong(object sender, EventArgs e)
		{
			using (NewSongDlg dlg = new NewSongDlg())
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					Lag Song = dlg.Song;
					songDocument.AddLag(Song);
				}
			}
		}

		private void OnAddPerformer(object sender, EventArgs e)
		{
			using (NewPerformerDlg dlg = new NewPerformerDlg())
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					Flytjandi performer = dlg.Performer;
					performerDocument.AddFlytjandi(performer);
					
				}
			}
		}

		private void OnAddList(object sender, EventArgs e)
		{
			using (NewListDlg dlg = new NewListDlg())
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					//TODO:
				}
			}
		}
	}
}